import request from '@/utils/request'

// 分页查询
export const GetSysUserListByPage = (pageNum, pageSize, queryDto) => {
    return request({
        url: `/admin/system/sysUser/findByPage/${pageNum}/${pageSize}`,
        method: 'get',
        params: queryDto
    })
}
//用户添加
export const AddSysUser = (data) => {
    return request({
        url: "/admin/system/sysUser/saveSysUser",
        method: 'post',
        data
    })
}
//用户修改
export const UpdateSysUser = (data) => {
    return request({
        url: "/admin/system/sysUser/updateSysUser",
        method: 'put',
        data
    })
}
//用户删除
export const DelSysUser = (id) => {
    return request({
        url: `/admin/system/sysUser/deleteSysUser/${id}`,
        method: 'delete',
    })
}

// 给用户分配角色请求
export const DoAssignRoleToUser = (assginRoleVo) => {
    return request({
        url: "/admin/system/sysUser/doAssign",
        method: 'post',
        data: assginRoleVo
    })
}